/**
 * Copyright(c) 2016-2019 by Euler
 * All Rights Reserved
 */
package com.booter.consumer;

import java.net.InetAddress;
import java.net.UnknownHostException;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
public class SpringBootConsumerApplication {

    public static void main(String[] args) throws UnknownHostException {
      //设置客户机的的ip和端口
        InetAddress address = InetAddress.getLocalHost();
        System.setProperty("spring.cloud.consul.discovery.hostname",
            address.getHostAddress());
        System.setProperty("spring.cloud.consul.discovery.port", "8082");
        SpringApplication.run(SpringBootConsumerApplication.class, args);
    }

}
